home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scientific American: The Amateur Scientist
/
Scientific American - The Amateur Scientist (Tinker's Guild)(2000).iso
/
amsci01
/
1980
/
12
/
1980-12-01.code
next >
Wrap
Text File
|
2000-09-11
|
882b
|
20 lines
<CODE>
10 CLS : RPD = .01745 : L= 35.0 * RPD : DL = 1.8 : H = 1.0 <BR>
20 INPUT "DECLINATION (DEG) ="; DECL : INPUT "DATE ="; A$ <BR>
30 INPUT "EQUATION OF TIME (MIN) ="; ET : ET = ET * 0.25 <BR>
40 INPUT "IS DIAL FAST OR SLOW"; B$ : D = DECL * RPD <BR>
50 IF B$ = "FAST" THEN ET = -ET <BR>
60 PRINT "DL ="; DL, "EQ TIME ="; ET, "TOTAL ANGLE ="; DL + ET <BR>
70 PRINT " ": PRINT "TIME (HRS)", "DIST (METERS)", A$ <BR>
80 X = TAN (L) : F = 1/ COS (L) : G = X + 1/X : W = 1/ SIN (L) <BR>
90 FOR K = 0 TO 10 : C = K * 7.5 * RPD : B = TAN (C) <BR>
100 E = SQR ( (B * F)l 2 + G t2) / G : J = 1/ (E * X) <BR>
110 A = ATN ( (G * E - J) / SQR (W 12 - J 12) ) <BR>
120 Z = TAN (A - D) / TAN (A) : DIST = H * (Z - 1) * (G * E - J) <BR>
130 PRINT T, DIST : T = T + .5 : NEXT K : END <BR>
</CODE>
A computer program to calculate shadow-tip positions for a sundial in the Northern Hemisphere